<template>
  <div>
    <el-button @click="go">
      类目管理系统
    </el-button>
  </div>
</template>

<script setup>
const userStore = useUserStore()
const userName = computed(() => userStore.name)

const router = useRouter()
const go = () => {
  const url = import.meta.env.VITE_APP_CATEGORY_SYSTEM_ADDRESS
  window.open(`${url}/#/login?userName=${userName.value}`)
  router.back()
}

onMounted(() => {
  go()
})
</script>
